package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.Folders;

public class TestFolderRemoving extends TestBase {

		@Test
		public void testFolderRemoving() {
			Folders oldFolders = app.getFolderHelper().getFolders();
			String folderName = "newfolder";
			if (oldFolders == null){
				throw new Error("There're not some folders");
			}			
			app.getFolderHelper().removeFolder(folderName);
			Folders newFolders = app.getFolderHelper().getFolders();
			assertThat(newFolders, equalTo(oldFolders.without(folderName)));
		}
}
